package cn.cyb.server.controller;

import cn.cyb.server.common.utils.oshi.Server;
import cn.cyb.server.domain.AjaxResult;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Administrator
 * @date 2025/1/12 0012
 */
@Tag(name = "ServerController", description = "服务器监控")
@RestController
public class ServerController {

    @Operation(description = "获取服务器信息")
    @GetMapping("/monitor/server")
    public AjaxResult monitor() throws Exception {
        Server server = new Server();
        server.copyTo();
        return AjaxResult.success(server);
    }
}
